
body {
  margin: 0;
}

/* Header */
header {
  background: var(--lv-ink, #14231B);
  color: white;
  padding: 15px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* lesovia.css paints every h2 dark ink, which vanished on the dark header */
header h2,
.navbar h2 {
  color: #E8F5EC;
  font-size: 16px;
  font-weight: 500;
  margin: 0;
}

#logoutBtn {
  background: #ef4444;
  border: none;
  color: white;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
}

#logoutBtn:hover {
  background: #dc2626;
}

/* Layout */
main {
  padding: 20px;
}

/* Products */
.products-section h1 {
  margin-bottom: 15px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.product-grid div {
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: transform 0.2s ease;
}

.product-grid div:hover {
  transform: translateY(-4px);
}

.product-grid h3 {
  margin: 0 0 8px 0;
}

.product-grid p {
  margin: 4px 0;
}

/*.buyBtn {
  margin-top: 10px;
  width: 100%;
  background: #4facfe;
  border: none;
  color: white;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
}*/
.addCartBtn {
  margin-top: 10px;
  background: #4facfe;
  border: none;
  color: white;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
}

.buyBtn:hover {
  background: #4facfe;
}

/* Orders */
.orders-section {
  margin-top: 40px;
}

#orderList {
  list-style: none;
  padding: 0;
}

#orderList li {
  background: white;
  margin-bottom: 8px;
  padding: 10px;
  border-radius: 6px;
  border-left: 5px solid #3b82f6;
}

#productList {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  padding: 20px;
}

.product-card {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.product-img {
  width: 100%;
  max-height: 150px;
  object-fit: cover;
  border-radius: 8px;
}

.price {
  font-weight: bold;
  color: #333;
}

.desc {
  font-size: 0.9em;
  color: #555;
}

.buyBtn {
  margin-top: 10px;
  padding: 8px 16px;
  width: auto;        /* 🔥 stops long button */
  border: none;
  border-radius: 6px;
  background-color: #4facfe;
  color: white;
  cursor: pointer;
}

.buyBtn:hover {
  background-color: #4facff;
}

.search-container {
  display: flex;
  justify-content: center;
  margin: 20px 0;
  gap: 10px;
}

#searchInput {
  width: 250px;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
}

#searchInput:focus {
  border-color: #1abc9c;
  box-shadow: 0 0 4px rgba(26, 188, 156, 0.5);
}

#searchBtn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  background-color: #4facfe;
  color: white;
  font-size: 14px;
  cursor: pointer;
}

#searchBtn:hover {
  background-color: #4facff;
}

/* EACH ITEM (targets your JS output automatically) */
#cartItems > div {
  display: flex;
  align-items: center;
  gap: 20px;
  background: white;
  padding: 15px;
  border-radius: 10px;
  border: 1px solid #ddd;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* IMAGE */
#cartItems img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
}

/* TEXT */
#cartItems h3,
#cartItems p {
  max-width: 900px; 
  /* margin: 4px 0; */
  margin: 20px auto;
}

/* REMOVE BUTTON */
#cartItems button {
  background: #ef4444;
  color: white;
  border-radius: 6px;
  padding: 6px 12px;
}

#cartItems button:hover {
  background: #dc2626;
}

/* CHECKOUT BUTTON */
#checkoutBtn {
  display: block;
  margin: 30px auto;
  background: #4f46e5;
  color: white;
  padding: 12px 25px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}

#checkoutBtn:hover {
  background: #3730a3;
}

/* Product detail page */

/* Center the whole content */
#productDetail {
  max-width: 900px;
  margin: 40px auto;
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* ===== TITLE ===== */
h1 {
  margin-left: 40px;
  margin-top: 20px;
}

/* ===== IMAGE SLIDER ===== */
/*.slider {
  position: relative;
  text-align: center;
  margin-bottom: 1;
}*/
  .slider{
    position: relative;
  }

  .slider-btn{
    position: absolute;
    z-index: 5;
  }

#detailImage {
  width: 100%;
  max-width: 420px;
  max-height: 400px;
  object-fit: cover;
  background: var(--lv-canvas, #f9f9f9);
  border-radius: var(--lv-radius-md, 10px);
}

/* Slider buttons */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  padding: 10px 14px;
  cursor: pointer;
  border-radius: 50%;
}

.slider-btn.left {
  left: 10px;
}

.slider-btn.right {
  right: 10px;
}

.slider-btn:hover {
  background: rgba(0,0,0,0.8);
}

/* ===== PRODUCT INFO ===== */
#detailName {
  font-size: 26px;
  margin-bottom: 10px;
}

#detailDesc {
  color: #555;
  margin-bottom: 15px;
}

#detailPrice {
  font-weight: bold;
  font-size: 18px;
  color: #2ecc71;
}

/* ===== INPUT ===== */
#detailQuantity {
  width: 70px;
  padding: 6px;
  margin-top: 5px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.optionContainer{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:20px;
}

.colorChip{

  padding:10px 18px;

  border:2px solid #ddd;

  border-radius:30px;

  cursor:pointer;

  transition:.2s;

  font-weight:bold;

  user-select:none;

}

.colorChip:hover{

  border-color:#007bff;

}

.colorChip.selected{

  border:2px solid #007bff;

  background:#eaf4ff;

}

.sizeChip{

  padding:10px 18px;

  border:2px solid #ddd;

  border-radius:8px;

  cursor:pointer;

  transition:.2s;

  font-weight:bold;

  user-select:none;

}

.sizeChip:hover{

  border-color:#007bff;

}

.sizeChip.selected{

  border:2px solid #007bff;

  background:#007bff;

  color:white;

}

/* ===== BUTTONS ===== */
#addToCartBtn {
  background: #4f46e5;
  color: white;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 15px;
}

#addToCartBtn:hover {
  background: #4338ca;
}

/* ===== CONTACT SELLER ===== */
#messageInput {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  resize: none;
}

#sendMessageBtn {
  background: #22c55e;
  color: white;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

#sendMessageBtn:hover {
  background: #16a34a;
}

/* ===== BOTTOM BUTTONS ===== */
button[onclick] {
  margin: 20px 10px;
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background: #06b6d4;
  color: white;
}

button[onclick]:hover {
  background: #0891b2;
}

.bottom-actions {
  text-align: center;
  margin-top: 20px;
}
.chat-box {
  max-height: 220px;   /* height of each product chat */
  overflow-y: auto;    /* scroll per product */
  padding: 10px;
  border: 1px solid #ddd;
  background: #f9f9f9;
  margin-top: 10px;
  border-radius: 8px;
}
.main-wrapper {
  max-width: 900px;     /* controls how wide it is */
  margin: 20px auto;    /* centers it */
  padding: 10px;
}

.chat-container {
  background: white;
  border-radius: 10px;
  padding: 15px;
}
#cartItems,
#cartList {
  max-width: 900px;     /* controls width */
  margin: 20px auto;    /* centers it */
}
.page-title {
  max-width: 900px;
  margin: 20px auto;
}

#card-element{
  border: 1px solid #ccc;
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 15px;
  background: white;
}
.review-card {
  background: white;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 15px;

  box-shadow:
    0 2px 10px rgba(0,0,0,0.08);

  border-left: 5px solid #f5b301;
}

.review-stars {
  font-size: 22px;
  color: #f5b301;
  margin-bottom: 10px;
}

.review-comment {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  margin-bottom: 12px;
}

.review-author {
  color: #777;
  font-size: 14px;
  font-weight: bold;
}
.reviews-section {
  max-width: 1000px;
  margin: 40px auto;
  padding: 20px;
}

.reviews-section h3 {
  margin-bottom: 20px;
}
.average-rating {

  font-size: 20px;

  color: #f5b301;

  font-weight: bold;

  margin-bottom: 15px;

}

/* ========================================= */
/* RESPONSIVE DESIGN */
/* ========================================= */

/* Tablets */
@media screen and (max-width: 992px) {

  header {
    padding: 15px;
  }

  #productDetail {
    margin: 20px;
    padding: 20px;
  }

  #detailImage {
    width: 60%;
  }

}

/* Phones */
@media screen and (max-width: 768px) {

  header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .search-container {
    flex-direction: column;
    align-items: center;
  }

  #searchInput {
    width: 90%;
  }

  #searchBtn {
    width: 90%;
  }

  #cartItems > div {
    flex-direction: column;
    text-align: center;
  }

  #cartItems img {
    width: 180px;
    height: 180px;
  }

  #detailImage {
    width: 100%;
    max-height: 300px;
  }

  h1 {
    margin-left: 0;
    text-align: center;
  }

}

/* Small Phones */
@media screen and (max-width: 480px) {

  main {
    padding: 10px;
  }

  .product-grid,
  #productList {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .buyBtn,
  .addCartBtn {
    width: 100%;
    font-size: 14px;
    padding: 8px;
  }

  .product-card {
    padding: 10px;
  }

  .product-img {
    max-height: 120px;
  }

}

.notification-btn{
    position:relative;
    display:inline-block;
}


.dashboard-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #1daedb;
    color: white;
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: red;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    font-weight: bold;
}



.logo{
    
  display:flex;
  align-items:center;
  gap:10px;
}

.logo img{
  width:60px;
  height:60px;
  object-fit:contain;
}

.logo span{
  font-size:36px;
  font-weight:700;
  color: var(--lv-green-mist, #E8F5EC);
}

.logo-text{
  font-family: var(--lv-font-display, "Fraunces", serif);
  font-size: 32px;
  font-weight: 600;
  color: var(--lv-green-mist, #E8F5EC);
  text-decoration: none;
  letter-spacing: -0.5px;
  transition: color 0.3s ease;
}

.logo-text:hover{
  color: #fff;
}

#checkoutModal{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,.6);

  display: none;

  z-index: 99999;
}

#checkoutModal > div{
  position: relative;
  z-index: 100000;

  background: white;
  width: 420px;
  margin: 80px auto;
  padding: 20px;
  border-radius: 10px;
}

/* ================= PHONES (iPhone and similar) =================
   Bigger text, 48px+ touch targets, and 16px+ inputs so iOS Safari
   doesn't zoom the page when a field is tapped. Loaded by the buyer pages
   (shop, cart, orders, product detail, messages, notifications). */
@media screen and (max-width: 700px) {
  body { font-size: 17px; line-height: 1.45; }

  h1 { font-size: 26px; }
  h2 { font-size: 22px; }
  h3 { font-size: 20px; }
  p, li, label { font-size: 17px; }

  /* Header: logo / name / logout stack tidily with a big Logout */
  header,
  .navbar {
    flex-wrap: wrap;
    padding: 12px 16px;
    gap: 10px;
  }
  header h2, .navbar h2 { font-size: 17px; margin: 0; }

  /* Compact header: logo + Logout on one row, "Welcome, Name" underneath */
  header {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    gap: 6px 12px;
    padding: 10px 16px;
  }
  header nav.navbar { padding: 0; order: 1; }
  header #logoutBtn { order: 2; min-height: 44px; padding: 8px 18px; }
  header h2#welcome { order: 3; flex: 1 0 100%; }
  header .logo img { width: 40px; height: 40px; }
  header .logo-text,
  header .logo span { font-size: 24px !important; }
  .nav-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  .nav-actions br { display: none; }

  #logoutBtn {
    min-height: 48px;
    padding: 10px 20px;
    font-size: 17px;
    font-weight: 700;
    border-radius: 8px;
  }

  .btn,
  button,
  .dashboard-btn,
  .notification-btn {
    min-height: 48px;
    font-size: 17px;
  }
  .btn { padding: 12px 18px; }

  /* Fields */
  input, textarea, select {
    font-size: 17px;
    min-height: 48px;
    box-sizing: border-box;
  }
  input[type="checkbox"], input[type="radio"] {
    width: 26px;
    height: 26px;
    min-height: 0;
    margin-right: 10px;
    vertical-align: middle;
  }

  /* Search + AI search (loose elements on the shop home) */
  #searchInput,
  #aiSearchInput,
  #categoryFilter {
    display: block;
    width: calc(100% - 28px);
    margin: 10px 14px;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
  }
  #searchBtn,
  #aiSearchBtn {
    display: block;
    width: calc(100% - 28px);
    margin: 0 14px 10px;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #4facfe;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
  }
  #aiSearchBtn { background: #1f6fb2; }
  main > h2, body > h2 { margin-left: 14px; margin-right: 14px; }
  .search-container { margin: 10px 14px; }
  .search-container #searchInput,
  .search-container #searchBtn { width: 100%; margin: 0; }

  /* Dashboard shortcuts (My Orders / View Cart / Messages / Notifications):
     two per row */
  .dash-shortcuts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 14px;
  }
  .dash-shortcuts .notification-btn,
  .dash-shortcuts button,
  .dashboard-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    min-height: 56px;
    margin: 0;
    padding: 10px 8px;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
  }
  .notification-badge {
    position: static;
    margin-left: 8px;
    width: 26px;
    height: 26px;
    font-size: 14px;
  }

  button[onclick] { margin: 10px 14px; min-height: 48px; font-size: 17px; }

  /* Products: one big readable card per row */
  main { padding: 10px; }
  /* Products: two per row, with text still easy to read */
  .product-grid,
  #productList,
  #shopProductList {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 10px;
  }
  .product-card { padding: 10px; font-size: 16px; }
  .product-card h3 { font-size: 18px; margin: 8px 0 4px; overflow-wrap: anywhere; }
  .product-img { width: 100%; height: 140px; max-height: none; }
  .price { font-size: 18px; margin: 4px 0; }
  .desc {
    font-size: 15px;
    line-height: 1.35;
    margin: 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .buyBtn,
  .addCartBtn {
    width: 100%;
    min-height: 48px;
    padding: 10px 6px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    box-sizing: border-box;
  }
  .buyBtn { margin-bottom: 0; }
  .addCartBtn { margin-top: 8px; }

  /* Cart */
  .page-title { margin: 14px 16px; }
  #cartItems,
  #cartList { margin: 14px 12px; }
  #cartItems > div { padding: 14px; gap: 12px; }
  #cartItems img { width: 100%; max-width: 240px; height: 200px; }
  #cartItems h3,
  #cartItems p { margin: 8px auto; }
  #cartItems button { min-height: 48px; padding: 10px 18px; font-size: 17px; }
  #cartControls,
  #cartTotalRow { margin-left: 16px !important; margin-right: 16px !important; }
  #cartTotalRow { font-size: 20px; }
  #checkoutBtn {
    width: calc(100% - 28px);
    margin: 20px 14px;
    min-height: 54px;
    font-size: 19px;
    font-weight: 700;
    box-sizing: border-box;
  }

  /* Checkout pop-ups have an inline 400px width -- shrink to the screen */
  #checkoutModal { overflow-y: auto; }
  #checkoutModal > div {
    width: auto !important;
    max-width: calc(100% - 24px);
    margin: 20px auto !important;
    box-sizing: border-box;
  }
  #payBtn,
  #closeCheckout {
    display: block;
    width: 100%;
    min-height: 52px;
    margin-top: 10px;
    font-size: 18px;
    border-radius: 8px;
  }

  /* Product detail */
  #productDetail { margin: 12px; padding: 16px; }
  #detailImage { max-height: 300px; }
  #detailName { font-size: 24px; }
  #detailPrice { font-size: 22px; }
  #detailQuantity { width: 90px; min-height: 48px; padding: 8px; }
  #addToCartBtn,
  #sendMessageBtn {
    width: 100%;
    min-height: 52px;
    font-size: 18px;
    font-weight: 700;
  }
  .slider-btn { min-width: 48px; min-height: 48px; font-size: 20px; }
  .colorChip,
  .sizeChip { padding: 12px 20px; font-size: 17px; }

  /* Orders, reviews, chat */
  #orderList li { padding: 14px; font-size: 17px; }
  .review-card { padding: 16px; }
  .review-comment { font-size: 17px; }
  .review-author { font-size: 15px; }
  .reviews-section { margin: 20px 12px; padding: 10px; }
  .chat-box { max-height: 300px; }
  .main-wrapper { padding: 6px; }

  .support-help { font-size: 16px !important; }
}

/* "Sponsored" label on a paid, promoted listing */
.product-card { position: relative; }

.listing-promo-label {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(20, 35, 27, 0.85);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

@media screen and (max-width: 700px) {
  .listing-promo-label { font-size: 13px; padding: 4px 10px; }
}
